﻿
namespace BEGDC.PreContract.DAL
{
    using System;
    using System.Collections.Generic;
    using Castle.ActiveRecord;
    using NHibernate.Expression;


    [ActiveRecord]
    public partial class CloseDate : ActiveRecordBase<CloseDate>
    {
		#region Const Definition
		
		public const string CONST_CloseDateID							= "CloseDateID";
		public const string CONST_Year									= "Year";
		public const string CONST_Month									= "Month";
		public const string CONST_Quarter								= "Quarter";
		public const string CONST_StartDate								= "StartDate";
		public const string CONST_EndDate								= "EndDate";

		#endregion
		
        #region Member Variables
        // Primary Key
        private System.Int32 _closeDateID;
        
        // Non Key
        private System.Int32 _year;
        private System.Int32 _month;
        private System.Int32 _quarter;
        private Nullables.NullableDateTime _startDate;
        private Nullables.NullableDateTime _endDate;

        // Parents
        
        
		

        #endregion

        public CloseDate() {
               
        }
        public CloseDate(
            System.Int32 year
            ,System.Int32 month
            ,System.Int32 quarter
            ,Nullables.NullableDateTime startDate
            ,Nullables.NullableDateTime endDate) : this() {
                
            this._year = year; 
            this._month = month; 
            this._quarter = quarter; 
            this._startDate = startDate; 
            this._endDate = endDate; 
        }
        
        #region Properties
        // Primary Key        
		
		#if (SQLServer)
        [PrimaryKey]
		#else
		[PrimaryKey(PrimaryKeyType.Native, SequenceName = "SEQ_CLOSEDATE_CLOSEDATEID")]
		#endif
        public System.Int32 CloseDateID {
            get { return this._closeDateID; }
            set {  this._closeDateID = value; }
        }
        
        // Non Key
        [Property]
        public System.Int32 Year {
            get { return this._year; }
			set { this._year = value; }
        }
        
        [Property]
        public System.Int32 Month {
            get { return this._month; }
			set { this._month = value; }
        }
        
        [Property]
        public System.Int32 Quarter {
            get { return this._quarter; }
			set { this._quarter = value; }
        }
        
        [Property]
        public Nullables.NullableDateTime StartDate {
            get { return this._startDate; }
			set { this._startDate = value; }
        }
        
        [Property]
        public Nullables.NullableDateTime EndDate {
            get { return this._endDate; }
			set { this._endDate = value; }
        }
        
        
        // Parent Relationships
        // Child Relationships
        
		
        #endregion
		
		// Clone
		public CloseDate Clone()
		{
			CloseDate newCloseDate = new CloseDate();
			
            newCloseDate.Year = this._year; 
            newCloseDate.Month = this._month; 
            newCloseDate.Quarter = this._quarter; 
            newCloseDate.StartDate = this._startDate; 
            newCloseDate.EndDate = this._endDate; 
			return newCloseDate;
		}
    }
}



